package lesson14;

class Person 
{
	String name;
	int age;
	String personalNumber;
	char sex;
	double weight;
	Person friend;
	int health = 50;//from 0 to 100
	int starvationStatus = 50;//from 0 to 100
	int mentalStatus = 50;//from 0 to 100
	int carsCapacity;//the number of cars the person can buy
	
	
	void eat(int foodVolume)
	{
		if(starvationStatus+foodVolume >= 100)
			starvationStatus = 100;
		else
			starvationStatus +=foodVolume;
	}
	
	void walk()
	{
		System.out.println(name + " is walking");
		starvationStatus-=5;
	}
	
	void growUp()
	{
		age++;
	}
	
	void drinkWater(double litres)
	{
		System.out.println(name +" is drinking " + litres + " litres of water");
		starvationStatus+=litres;
	}

	public void initializeCarsCapacity() 
	{
		carsCapacity = (int)Math.round(Math.random() + 1);
	}

	public boolean willingToBuy() 
	{
		return (Math.round(Math.random() + 1)) == 1;
	}
	
	
}
